-- Common Mart
Use RD_COMMON

CREATE NONCLUSTERED INDEX [index_Star_BusinessUnit_K1_K49_K45_K9_46_50] ON [dbo].[Star_BusinessUnit] 
(
	[BusinessUnitID] ASC,
	[Category20Code] ASC,
	[Category18Code] ASC,
	[CompanyNumber] ASC
)
INCLUDE ( [Category18],
[Category20]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [index_Star_Employee_K1_4_6] ON [dbo].[Star_Employee] 
(
	[EmployeeNumberID] ASC
)
INCLUDE ( [EmployeeNumber],
[EmployeeName]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]


-- Payroll Mark
Use RD_PayrollMart;



CREATE NONCLUSTERED INDEX [Payroll_Star_Employee_K76_K75_K1] ON [dbo].[Payroll_Star_Employee] 
(
	[DataItemSecondary] ASC,
	[DateTerminated] ASC,
	[EmployeeID] ASC
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]


-- HR Mart
Use RD_HRMart;
CREATE NONCLUSTERED INDEX [index_HR_Star_Facts_K5_K4_K34] ON [dbo].[HR_Star_Facts] 
(
	[EmployeeID] ASC,
	[BusinessUnitID] ASC,
	[EmployeePayStatus] ASC
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]
